有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!


共 (2) 个答案

  1. # 1 楼答案

    以下几点对我很有用:

    <action id="MyCustomAction.UniqueID"
            class="com.mycompany.MyCustomAction"
            text="Execute an action" icon="/MyIcons/icon-16x16.png">
        <add-to-group group-id="ToolbarRunGroup" anchor="last"/>
    </action>
    

    情况如下:

    enter image description here

  2. # 2 楼答案

    您可以将操作添加到VcsNavBarToobarActions组。您可以通过在plugin.xml中添加以下内容来实现这一点

    <actions>
            <group text="MyNavBarGroup">
                <add-to-group group-id="VcsNavBarToobarActions" anchor="last"/>
                <action class="com.myplugin.action.RandomAction" text="Random" icon="/icons/pdf-icon.png"/>
            </group>
    </actions>
    

    我添加了一个随机的pdf图标,因为这就是我手头的东西。 enter image description here

    请参见
    上的讨论 https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004225719-New-actions-on-toolbar